added getBlocks() method, needs testing