added attribution and updated error messaging