- moved magic method code into method factory