completed vars and funcitons