applying passed up variables