dumping function v1 working now