added script calling functionality