for functional d