added fromExtensions method.