#1: added more example problems
#2: improved diff performance