polish up distance interface; print pattern with most matches