Sort fucntion not valid :(