Check out this previous post by Scott Davidson. This should get you on the right track:

Dover Compounding