errors in orig. author's work in scriptlinker. hacked up to fix need to revist soon.