removed redundant algorithm by generalizing for all SensorTag array
sizes