finished teamheadin function