completed window script prototype