fixed read in code