working randomcone analysis and plotting macro