added check for values