Add getCost method