creating method to match tokens