:when version simplified by removing unnecessary checking.