starting restructure the code into using redis and mongodbo