main app from rails tutorial