moving logic out of board