implemented sensor and system noise, corrected sensor function