add documentation, change dim to shape
update save_regions