refactoring: created new class for tile processing