Write method working but not tested