protected function responseTemplate($template, $data = array()){
        
        if(!isset(hubert()->template)){
            throw new \Exception("no template engine installed");
        }
        $html = hubert()->template->render($template, $data);
        $this->_response->getBody()->write($html);
        
        return $this->_response;
        
    }