separated manager process from main.c