updated writer interface to match reader