move vars to top