switched dump function