added writer.java