add near element detection