rewrite str2bool(), add test