moved custom diff logic to the proper place