added ability to use external script