If upon the hearing it appears to the court that testimony is necessary for the proper disposition of the matter, the court may take evidence, or appoint a referee to take such evidence as it may direct and report the evidence to the court with the referee's findings of fact and conclusions of law, which constitute a part of the proceedings upon which the determination of the court is made.
SDCL 11-2-64