made sure query returned data