1st ver of helper code, plotting code and generated plots