1. add corner case handling to reader