database set up closes #5 closes #6 closes #13