refactoring -- same file to with different inputs