using repository intead of template