initial
added database writing
tidy
tidy
tidy