use extends in errors; remove ? operator in entities sort