working on template and controller