added plotting of functions