defined four functions for clearity
Merge branch 'master' of https://github.com/haru110jp/KMR