finally fixed sorting and limitTo