added populate_boards function