Here's a patch that encapsulates my thoughts. Br, Jarkko