after testing the diff function