fixed required value handling
updated