change from public to private memver variables and added getter for it