Finished the code.