make more use of "damain" varible