added more matching functionality