Code

patch from John Bintz, adding pref to simplify multiple paths separately