? ?"this is just what I am trying now.It is not perfect but it works."
I am wondering why you say it is not perfect.
If you have the frequencies and their phases right, it ought to be perfect.? In fact the phases don't really matter, except in a relative way.
Of course we are always dealing with sampled data, so there are imperfections due to that fact (which can be reduced by changing the sampling rate, to the degree that we have control over it).