Update the missing piece of code to make program work properly.