EX 7-7 FIFO, LIFO costs under perpetual inventory system

The following units of a particular item were available for sale during the year:

Beginning inventory

180 units at $80

Sale

120 units at $125

First purchase

400 units at $82

Sale

300 units at $125

Second purchase

300 units at $84

Sale

275 units at $125

The firm uses the perpetual inventory system, and there are 185 units of the item on hand at the end of the year. What is the total cost of the ending inventory according to (a) FIFO, (b) LIFO?