[refactor] Remove uses of helper function