refactoring argument parser
refactoring out search method
commenting sed scripts