set duration instead of setDelay() method.