HW7:task3: divided logic & visualization, added Doxygen comments