finish processing procedure