wired up algo and everything in else in controller, gonna test on heroku