added ggplot for fig2 and cleaned up some stuff