intermidiate commit
fixed sortign