added position function switching reaction