finalized script