update gather.js to handle periodical requests