adding getAttachment method