implemented a wavefront reader