added a write test