class refactored in chartgenarator part