code refactoring + charts
code refactoring + charts