Thanks. I hoped that someone had done this earlier and there is an implementation to it available.