change errors to panic