cleaning up sorting part...