some comments for this $query would be nice.