Function and add conditional execution mode