refactor block extent calculations