changed to fit UML & fixed errors