Nearly working version. Have to debug ex. path1p