Implemented data writing

It is now requirement-compliant!