added endwise/autoclose