Rebecca bought 4 sweaters that each cost the same amount and 1 skirt that cost $40. The items she bought cost a total of $160 before tax was added. What was the cost of each sweater?