window.setinterval issue resolved