script: complete implementation (in progress)