refactor and add condition at buildteam