read with edge cases