add idempotence and its test
Merge branch 'sec07'