cleaned up main loop, added score