incorporate database
incorporate database, some bugs