perform calculations in a multiprocessing.Process to avoid locking up
add some constants