refactored and added another sensor