added when.and.then
added .when(condition) ideas