global improvement of code (still for changung position in mm)