a bit of cleanup and rename back to close