Much cleaner than the approach that I took.