Add diff api + updated test for api