Modified ploter and added to code