fix bug on None
output to file
add multiprocessing
store data in memory