Why is it an error if there is more than one?  Won't that happen fairly often?  Should this function return a vector (or fill a vector) instead?