for double check we need the var to be volatile