The below might give you some ideas.
I think Bob has a tutorial on that one somewhere, but I can’t find it right now.