Feature-master-write-reimpl

reimplemented write_impl
added test for new write-impl
removed previous write-impl