added match function to utils