re-write mad things cleaner, but getting an exception
seems to be running without issue
remove print statements, do some formatting