added new writer method