add getter method for internal fields.