updated the helper function and removed some unimportant code for the time being