refact dumps_function import code