wrote function for listing players