added mongo function to return an array of documents based on ids