re-org code into a proper GLM framework
re-run