callback hell refact. main data structure per process added