added javadocs for setFormats, fixed things for the pr