refactoring: made executeWraps() flow easier to understand