adding the DB parsing code