miscellaneous unrelated bits of code