trying to fix sorting