split closestElement into 2 methods: getElement and closest