upgraded to work with moddl 0.2.0