started adding registration logic. fixed