move setInterval callbacks to seperate functions to be triggered on page-load