someone's awful code I am fixing