add function dump  for debug