improved percent encoding