Updated panic pseudo code method