re-factored SensorFactory to return a generic Sensor in createSensor