better checking condiction