typeerror: register is not a function