removing duplicated checks