added maxfield size and unit test