added test for new write-impl, removed previous write-impl