prob 113
Tweaks to #57
faster #57