implemented writer