implemented writer tests