refactored and got highcharts to work