refactoring, tune params