Updated valid-transition? and add-transition to handle the t at the beginning of each transition