refactoring: extracted Grid (read a grid of integers from a file)