first attempt at matching