managed to plot first energy spectrum but quick and dirty job