Added proper cost estimation