if url[-1] == ")" and ((url.count("(") - url.count(")")) < 0)
              url = url[0..-2] # discard closing parenth from url
              post = ")" + post # add closing parenth to post
            end