what's the reason for this when condition?