began to redo the code