show_patch function