Add register. TODO : change register to use template.