register off
finished write off function