finish the application script