refactor _handle_btn_save and make more faster