uncommented control[i]=-1 and made it 0