Function write (23/32)

Function write