minor changes on writer