add more setting
add safety handling