common template for register