Tweak to allow for calling from another script