move the definition of the value of variables to seperate function at bottom
move highcharts to own function