Optimized iteration & made nth argument optional