added comments and modified accessor method