adding getList function and change callback error handling