Adding code for dst and idst for kinds 1-4.