community context history support, example code and integration test
updated
code refinement