Revert "function switch location"

This reverts commit 3a50b409caa8fd6a3b6442c3f2101cfcba5262a9.