changed how tileSize is loaded (now from global)