Write "write"

pass tests for "write"