updated error formatting