added increment for length