added getNextBlock() method