add testing code for SelectMany