adding validations on key & value length