updated tests, added better error messages when value missing