- moving debug into template