Added some calculation to chunk file

Just an experiment to see if chunking the file manually works, therefore,
added some calculations to chunk the file, not yet finished...