adds writer method