added new methods for init and update boardArray