use _.range instead of explicit loop
updated docs