added blocks logic sub