updated readme and writer code