add validation before we append this to the returned buffer