function D added