refactor parent access
add InvalidContextException