modified the registrationtype integer to an enum for better understanding