cleaned query before sending to view then added page parameter