adding some doc and clear method for the write handler