adding getExtension method