better quality goes first