updated error analysis