changing function parameters from file paths to python objects