edited passing of variables