plotting code added - not working