codes for personal research projects. Not intended for outside use.