added preliminary code for registration.