refactored the panic away