random bits of code from research