trying to fix sorting issue