moved template to another file and other things