added check for variable