public ctor should check null params.