Added getExtension method