implement digi matching