a few optimizations to the ins reading