Denver replacing traffic signals at 40 intersections