trying to make it sort correctly