pretty much fully working version - all process end up at dead state, but we took out random number generation since it doesn't really work.