refactor to put registrationevent in registration directory