factor hole-related codes out