implementing transition on selecting word