trace function done