refactor runs into methods, add cmd line edit threshold