added console message and fixed the app
added templating code