added state controller and template