better dealing with relative paths