Fixed sorting and added aescending option