Finished implementing functions.