apologies for the circuity...  this is fairly well intact