implemented ungreedy flag (U) #2