register function done