updated condition pattern