random analysis code I wanted in the cloud