stats refactoring
chart improvments