add device register function