add num limit, and tests