added registrationg functional to DB