Updated: just a wee refactor to improve code readibility. Used "".format()'s ability to specify variable names between curly brackets.