big overhaul per Brian's suggestions