also can this be made a helper function?