updated to handle generic remotepaths