another edit to mechanize logic, trying to get it to work on heroku