bm_write_var_str implemented