some work on template