Not sure if you still need this but lf you do then look at this sample by Randy Birch.