updated helper class with writer support