An example of how to do this was created can be found here