these two lines could be in line 1127 and the whole ok variable removed, right?