A selective and long-term stable nitrate sensor