bits of code to save for reference and study