What is the smallest unit of a compound like carbon dioxide (CO2), water (H2O), nitrogen dioxide (NO2) that still have all the properties of that compound? Choose the answer below.

A: a nucleus
B: an atom
C: an element
D: a molecule