Move some query for better naming