better place for sort