add validation to ensure names are present