more logic for transitions