moved debug prints to debug blocks, magic number batchSize