Thanks.  Re-factored that bit of code.