converted to rails for heroku