clean up after much experimentation and thrashing