Avoid using setImmidiate (only available in node and ie)