used list comprehensions to handle board sizes