edit code for reading