Implement diff api