re-add methods accidentally lost in rewrite
account for when $^X isn't a full path