marked the 'success' and 'cancel' states as end states in a formal way