In my comment I reformatted the code and github stripped the leading spaces, so my reply isn't indented properly.