implement preregisterHandle, registerHandle