finished add dialog. made db a singleton