replace static field with static function with singleton