finalized the application