writer as an object attribute