updated how getAll works for mongoDb