Midstream save

writing multiple helper functions, switching branches