add goto edition of while-loop