add limit and OrderBy + correct bugs