nice - we should definitely suck this out into a shared utility lib