clear function done