_write logic is much cleaner now