Added actual code to the stubs given by the instructor