adding transitions and cleaner interfacing for templates