add min_spin
change makefile