changed query for heroku in controller