functional parse with simple documents