using os.path instead of custom path parsing