edited blockLogic