added the register events method to the on enable thing