read implemented with callbacks