#46 Implemented write (not tested)