channels api and template logic work