converted registration system to mongodb