rename choose_assign gendefine type to choose_to
fix windows line ending handling