added a way to handle clearing on blocks to give more control over flow