updated error and example