Solving the productivity puzzle by understanding teamwork