test input module and fix bug