template nad rest of code