add player function