added var to prevent refrence errors