finalize the app