added legend to the plots. Fixed the SBA bug.
TODO change the SBA function and find appropriate way to plot the data