added comment to the match function