fixes #3

added support for required fields