added gen_functions.py with make_chunks