complete function of save and show application