refactoring: use vector instead of array. move a util.
implement nextMissingPart