improve validation + register tpl