added scoreboard cleaned up code