foctorize code
improve charts sub menu