fixed readPut to look like example code