minor change: chunk size and position of exceptions within innerFunc
minor bug
use dictionaries wherever possible