completes the initial code