from 0 to i