revert the wrongly changed test code
Move sorting to different location