creating objects for d