a ton of work on moving everything to variables