removed extra query to database