adding getItem function