added statistics collection method, and debug in all modules