create template class and move render method into base command