Wrote the code for the stubbed out functions.