added a faster interval for counting scores
cleaned up code, declated global variables volatile
was wrong about volatile