implemented pred-and