Optimization (change comma operator with &&)