split to 2 function, and 2 more test for esaped