calculating cost