refactoring and add reference code, add README explaination,  after session