Modified template script