Contains select code used during thesis calcs