updated the module to work both with D2 0.15 and with lower versions of it