previous version couldn't handle my 197 changes

this one works and is a little cleaner