implement stay and move functionality