reworked block handling