added new main with global c listener