my own math mistakes this time, and a few organisational tweaks