prints thing read. But does not seem to read correctly. Also, seg fault?