changed type tempOfSys to double