updated with change from resize_egrid_master