improve extraction of annotations