what is difference between subsitution reaction and functional group