add write piece to board and clear board functions