allow changing default and add constraint function test