added support for "required" and "default"