made a lot of variables dynamic