optimized team code