including a helper function necessary for previous commit