improved validator instantiation by using constructor instead of direct member access.