Added db
Find some bugs.Smack it