adding code for registration.