Updated domes() function