add the register functionality