edited query