added basic registration.  needs testing