An empirical micro matching model with an application to Italy and Spain