path function allowed for nesting