experimental replacement of lib getPaths function