fix helper function unit tests