add percent encoding func