Opening bids of 4C and 4D show strong preemptive openings of hearts and spades, respectively. 
Thus, 4H and 4S are used to show less strong hands and more strength is needed from partner to make a 
slam. After 4C and 4D, 4D or 4H is used by responder to "retransfer" the hand to opener and then further bids may be used to find out opener's hand.

You can find one way to do it here.