the naming is strange, as the function also has side effects.
I think @twokul's suggestion might make more sense.