made the dispatch process send events via json through a channel (the c kind), made another function that receives it and sends it trough another channel (the go kind)
todo: remove usage of function-local data trough channel
todo:find error that is causing the c channel to fill up?