edit query