static util methods for finding containing elements