chnaged template processing to single file