move template code