old stuff from the original script