added run, getChunks
refactoring