initial template handler work