add script() and a test for it