implemented incupsulation and sreated getter and setter , and fixed errors