now correctly parses reads and writes