just use mongodb func