I'm resolving this ticket by rejecting it. Putting the relevant code into a subroutine which is only used once wouldn't make it any simpler, especially given that the subroutine would need 9 arguments to work. Thank you very much. kid51