extract path into variable