Diff rewritten, now working as expected