adding conditional checks for scenarios