added URL decoding to the input parsing functions