REF: helper function in a separate file