Added some stuff for registering for event