added board print and fixed out of bounds