Added proximity detection