Changed diff function to better fit problem