seperating extraction and plotting