added a function to plot E vs k