properly filter balls
added util file