final version of relative (confusing) path version of script which should work fine for now