added alert box to display data retrival errors
error handling