refactor + ban player function