program encapsulated in functions
cleared old fake-rate-plotting tool