Add reverse function def dealing

Add reverse function def dealing