Changed single() to findOne() and toArray() to findMany()