cleanup work for registrationg