not perfect but work nice, easy to understand and modify...
tcompare3.mfa