url encode method modified, added url decode method