add naive spanning and change twostack