Updated for hole detection