see comment in line 750