changed static assignments to magic method