finish script