design and cleanup