an engineer by background , mcginnis used his training and the resources of the church to dig fresh water wells , create irrigation systems for the crops or construct a dam to power electric generators .