added data_tool.pl functions