mid update
More tests and enhancements