added support for client side, sort and limit