helper function done
helper function done