changed defaults to a function, because the array and object values are not safe in a plain object (not recreated per instance, but shared by multiple instances)