the initial function done