Style nit: this block of code should be indented by 4 spaces instead of 2.