added offset and limit