This topic has a couple of different approaches:
As I recall there is another topic implementing Kangaroo, maybe have a search.