corrected query to compare name