added some batch processing to reduce setIntervals, ya wanka