You're missing an end, which is causing this code to not even work. Run the app before submitting a pull request.