updated models for optional types
updated models for optional types
added test