custom match template almost done