Durable nitrate sensor by surface modification