block logic