added db functionality to code.
added tests to check that db works.
completed lesson 4a. YAY!