add if for ball collection.