cleaning the mongo record reader code