move to VADocument class. many bugs.