parallel_magic: adds some generic, parallel code