initializing code for glide-and-twist controller