dependency inversion principle practice