use nlargest rather than sorted