CUT function fixed