modify functions to make code easier to read
Add UML graph