auto box and cleanup