uses enumerate in loop where index is needed