Adding Adam's code since he can't talk to git