Added functions to subscribe on template