generalise default path
functioning but slow