encode address on write