modified handeling of sensor and fitness