Writer a solver
typo fix, add spin option