Add time matching routine