adding template code and service start