modified formatter to use getters and setters