resume function edtied