script is returned along with result
fixed tests