This is the original Rep 2X costing script