added keys to invalid array
added set function