updated for 3 sensors