Improved time limit ; added RMS error.