Rewritten part of the BoardController using lambdas