get substring enclosed in paranthesis and remove them