add success_install and fail_install function