adding diff function to array utils