removing when conditions