Created a stateBlockSize function