replaced monk with mongoose, grouping functions, other stuff