Rewrite using property getters and setters