What a coincidence! our first thing on our todo today was to abstract that code into its own module and include it into the model class. But i guess this works too.....