Updated example to use readAll()