added comments and defined getters and setter