working on printing query results returned from server