some changes to parsing file and to db.h