refactor for threading

underscore parameters.