added skipRest to replace skip(uint.max)