updated .db file and few refactoring