added array filter function to mongo class