a few changes in doc parser