added aggregate function to mongodb library