allow path to be a string