refactor when to create a new block