removing unused variables
organizing board into functions