cases and cleanup