next round of feedback. clearer variables, less identation - but not sure about then/catch pattern