rewriting scoreboard to use findAndModify (simpler code)