should I use getAttachedSensor() or getSensor()?