added functions to check board history and add to history