added server logic for no query results