Sorting is worked now but htere is some bug