fix bugs
Added uml diagramm