can we convert the query to a generic object?