small refactor

Minor refactor per Andrei's suggestion.