finished

+ database management
+ logging function