implemented own BinWriter