change the position of helper function