fixed bytes written; refactoring; documentation