difference implementation (imcomplete)