refactor pick into one method and combine `conts` and `fileNames` into one function