added magic methods in other classes and changed vibility of methods and properties