solve it in the helper function