changed template->render handler and add config.class