adapted code to team style