first level working with sensor and relay