added test for next function
implemented next method on returned match