added diff functions