added debug option
added serialize tests
modified tests
adding database modification functions