cleanup, glide function in main