add getExtension method