added check if it is lookup