changed delay from 1 secnd to 20 ms