repair function number IN-OUT