updated template and added application_env setting