Take in the variables before using

Take in the variables before using