Much simpler matches function