event provessing in main only