update debug code with var_dumps