change toArray to stream in mongo storage