This is the code that I used in this video screencast http://youtu.be/FZr75CsBNag