added test for optional field
added support for optional fields