changed the functions name
swapped event registration and set script