outlined the score main loop