converted to rack app for heroku deployment