add mutex and scopeguard
add constant.h