change data members to protected