Modify transitions to be a list instead of a set. Implement concatenate()