added field validations and tests