actually fixed spans, previous implementation of mine was incomplete