add replacement for spin.hpp