changes to scratch and plotting