use mongodb aggregation framework