Changed the amount varibale to get the cost