add tests for sub expression
update doc