implemented a function to retrieve estimated costs of an op