renamed compare function to compare_files